Optimal. Leaf size=89 \[ -\frac {b^3 \text {ArcTan}\left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)^{7/2}}-\frac {\left (a^2+3 a b+3 b^2\right ) \cot (x)}{(a+b)^3}-\frac {(2 a+3 b) \cot ^3(x)}{3 (a+b)^2}-\frac {\cot ^5(x)}{5 (a+b)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3270, 398, 211}
\begin {gather*} -\frac {\left (a^2+3 a b+3 b^2\right ) \cot (x)}{(a+b)^3}-\frac {b^3 \text {ArcTan}\left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)^{7/2}}-\frac {\cot ^5(x)}{5 (a+b)}-\frac {(2 a+3 b) \cot ^3(x)}{3 (a+b)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 398
Rule 3270
Rubi steps
\begin {align*} \int \frac {\csc ^6(x)}{a+b \cos ^2(x)} \, dx &=-\text {Subst}\left (\int \frac {\left (1+x^2\right )^3}{a+(a+b) x^2} \, dx,x,\cot (x)\right )\\ &=-\text {Subst}\left (\int \left (\frac {a^2+3 a b+3 b^2}{(a+b)^3}+\frac {(2 a+3 b) x^2}{(a+b)^2}+\frac {x^4}{a+b}+\frac {b^3}{(a+b)^3 \left (a+(a+b) x^2\right )}\right ) \, dx,x,\cot (x)\right )\\ &=-\frac {\left (a^2+3 a b+3 b^2\right ) \cot (x)}{(a+b)^3}-\frac {(2 a+3 b) \cot ^3(x)}{3 (a+b)^2}-\frac {\cot ^5(x)}{5 (a+b)}-\frac {b^3 \text {Subst}\left (\int \frac {1}{a+(a+b) x^2} \, dx,x,\cot (x)\right )}{(a+b)^3}\\ &=-\frac {b^3 \tan ^{-1}\left (\frac {\sqrt {a+b} \cot (x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)^{7/2}}-\frac {\left (a^2+3 a b+3 b^2\right ) \cot (x)}{(a+b)^3}-\frac {(2 a+3 b) \cot ^3(x)}{3 (a+b)^2}-\frac {\cot ^5(x)}{5 (a+b)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.43, size = 90, normalized size = 1.01 \begin {gather*} \frac {b^3 \text {ArcTan}\left (\frac {\sqrt {a} \tan (x)}{\sqrt {a+b}}\right )}{\sqrt {a} (a+b)^{7/2}}-\frac {\cot (x) \left (8 a^2+26 a b+33 b^2+\left (4 a^2+13 a b+9 b^2\right ) \csc ^2(x)+3 (a+b)^2 \csc ^4(x)\right )}{15 (a+b)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 83, normalized size = 0.93
method | result | size |
default | \(-\frac {1}{5 \left (a +b \right ) \tan \left (x \right )^{5}}-\frac {2 a +3 b}{3 \left (a +b \right )^{2} \tan \left (x \right )^{3}}-\frac {a^{2}+3 a b +3 b^{2}}{\left (a +b \right )^{3} \tan \left (x \right )}+\frac {b^{3} \arctan \left (\frac {a \tan \left (x \right )}{\sqrt {\left (a +b \right ) a}}\right )}{\left (a +b \right )^{3} \sqrt {\left (a +b \right ) a}}\) | \(83\) |
risch | \(-\frac {2 i \left (15 b^{2} {\mathrm e}^{8 i x}-30 a b \,{\mathrm e}^{6 i x}-90 b^{2} {\mathrm e}^{6 i x}+80 a^{2} {\mathrm e}^{4 i x}+230 a b \,{\mathrm e}^{4 i x}+240 b^{2} {\mathrm e}^{4 i x}-40 a^{2} {\mathrm e}^{2 i x}-130 b \,{\mathrm e}^{2 i x} a -150 b^{2} {\mathrm e}^{2 i x}+8 a^{2}+26 a b +33 b^{2}\right )}{15 \left (a +b \right )^{3} \left ({\mathrm e}^{2 i x}-1\right )^{5}}+\frac {b^{3} \ln \left ({\mathrm e}^{2 i x}+\frac {-2 i a^{2}-2 i a b +2 a \sqrt {-a^{2}-a b}+b \sqrt {-a^{2}-a b}}{b \sqrt {-a^{2}-a b}}\right )}{2 \sqrt {-a^{2}-a b}\, \left (a +b \right )^{3}}-\frac {b^{3} \ln \left ({\mathrm e}^{2 i x}+\frac {2 i a^{2}+2 i a b +2 a \sqrt {-a^{2}-a b}+b \sqrt {-a^{2}-a b}}{b \sqrt {-a^{2}-a b}}\right )}{2 \sqrt {-a^{2}-a b}\, \left (a +b \right )^{3}}\) | \(293\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 127, normalized size = 1.43 \begin {gather*} \frac {b^{3} \arctan \left (\frac {a \tan \left (x\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \sqrt {{\left (a + b\right )} a}} - \frac {15 \, {\left (a^{2} + 3 \, a b + 3 \, b^{2}\right )} \tan \left (x\right )^{4} + 5 \, {\left (2 \, a^{2} + 5 \, a b + 3 \, b^{2}\right )} \tan \left (x\right )^{2} + 3 \, a^{2} + 6 \, a b + 3 \, b^{2}}{15 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \tan \left (x\right )^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 273 vs.
\(2 (77) = 154\).
time = 0.45, size = 610, normalized size = 6.85 \begin {gather*} \left [-\frac {4 \, {\left (8 \, a^{4} + 34 \, a^{3} b + 59 \, a^{2} b^{2} + 33 \, a b^{3}\right )} \cos \left (x\right )^{5} - 20 \, {\left (4 \, a^{4} + 17 \, a^{3} b + 28 \, a^{2} b^{2} + 15 \, a b^{3}\right )} \cos \left (x\right )^{3} + 15 \, {\left (b^{3} \cos \left (x\right )^{4} - 2 \, b^{3} \cos \left (x\right )^{2} + b^{3}\right )} \sqrt {-a^{2} - a b} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (x\right )^{4} - 2 \, {\left (4 \, a^{2} + 3 \, a b\right )} \cos \left (x\right )^{2} + 4 \, {\left ({\left (2 \, a + b\right )} \cos \left (x\right )^{3} - a \cos \left (x\right )\right )} \sqrt {-a^{2} - a b} \sin \left (x\right ) + a^{2}}{b^{2} \cos \left (x\right )^{4} + 2 \, a b \cos \left (x\right )^{2} + a^{2}}\right ) \sin \left (x\right ) + 60 \, {\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 3 \, a b^{3}\right )} \cos \left (x\right )}{60 \, {\left (a^{5} + 4 \, a^{4} b + 6 \, a^{3} b^{2} + 4 \, a^{2} b^{3} + a b^{4} + {\left (a^{5} + 4 \, a^{4} b + 6 \, a^{3} b^{2} + 4 \, a^{2} b^{3} + a b^{4}\right )} \cos \left (x\right )^{4} - 2 \, {\left (a^{5} + 4 \, a^{4} b + 6 \, a^{3} b^{2} + 4 \, a^{2} b^{3} + a b^{4}\right )} \cos \left (x\right )^{2}\right )} \sin \left (x\right )}, -\frac {2 \, {\left (8 \, a^{4} + 34 \, a^{3} b + 59 \, a^{2} b^{2} + 33 \, a b^{3}\right )} \cos \left (x\right )^{5} - 10 \, {\left (4 \, a^{4} + 17 \, a^{3} b + 28 \, a^{2} b^{2} + 15 \, a b^{3}\right )} \cos \left (x\right )^{3} + 15 \, {\left (b^{3} \cos \left (x\right )^{4} - 2 \, b^{3} \cos \left (x\right )^{2} + b^{3}\right )} \sqrt {a^{2} + a b} \arctan \left (\frac {{\left (2 \, a + b\right )} \cos \left (x\right )^{2} - a}{2 \, \sqrt {a^{2} + a b} \cos \left (x\right ) \sin \left (x\right )}\right ) \sin \left (x\right ) + 30 \, {\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 3 \, a b^{3}\right )} \cos \left (x\right )}{30 \, {\left (a^{5} + 4 \, a^{4} b + 6 \, a^{3} b^{2} + 4 \, a^{2} b^{3} + a b^{4} + {\left (a^{5} + 4 \, a^{4} b + 6 \, a^{3} b^{2} + 4 \, a^{2} b^{3} + a b^{4}\right )} \cos \left (x\right )^{4} - 2 \, {\left (a^{5} + 4 \, a^{4} b + 6 \, a^{3} b^{2} + 4 \, a^{2} b^{3} + a b^{4}\right )} \cos \left (x\right )^{2}\right )} \sin \left (x\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\csc ^{6}{\left (x \right )}}{a + b \cos ^{2}{\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 156 vs.
\(2 (77) = 154\).
time = 0.43, size = 156, normalized size = 1.75 \begin {gather*} \frac {{\left (\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (x\right )}{\sqrt {a^{2} + a b}}\right )\right )} b^{3}}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \sqrt {a^{2} + a b}} - \frac {15 \, a^{2} \tan \left (x\right )^{4} + 45 \, a b \tan \left (x\right )^{4} + 45 \, b^{2} \tan \left (x\right )^{4} + 10 \, a^{2} \tan \left (x\right )^{2} + 25 \, a b \tan \left (x\right )^{2} + 15 \, b^{2} \tan \left (x\right )^{2} + 3 \, a^{2} + 6 \, a b + 3 \, b^{2}}{15 \, {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \tan \left (x\right )^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.37, size = 101, normalized size = 1.13 \begin {gather*} \frac {b^3\,\mathrm {atan}\left (\frac {\sqrt {a}\,\mathrm {tan}\left (x\right )\,\left (a^3+3\,a^2\,b+3\,a\,b^2+b^3\right )}{{\left (a+b\right )}^{7/2}}\right )}{\sqrt {a}\,{\left (a+b\right )}^{7/2}}-\frac {\frac {1}{5\,\left (a+b\right )}+\frac {{\mathrm {tan}\left (x\right )}^2\,\left (2\,a+3\,b\right )}{3\,{\left (a+b\right )}^2}+\frac {{\mathrm {tan}\left (x\right )}^4\,\left (a^2+3\,a\,b+3\,b^2\right )}{{\left (a+b\right )}^3}}{{\mathrm {tan}\left (x\right )}^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________